home *** CD-ROM | disk | FTP | other *** search
/ Collection of Tools & Utilities / Collection of Tools and Utilities.iso / pascal / parstp25.zip / PARSER.INT < prev    next >
Text File  |  1994-02-14  |  1KB  |  57 lines

  1. (******************************************************************************
  2. *                                   parser                                    *
  3. * Ron Loewy, 1992. A mathematical recursive decent parser +-/*^ and functions *
  4. * Version 2.5, Feb. 1994.                                                     *
  5. ******************************************************************************)
  6. {$ifdef dll}
  7. library parser;
  8.  {$N+,S-}
  9. {$else}
  10. unit parser;
  11.  
  12. {$ifdef ovl}
  13.    {$O+,F+}
  14. {$endif}
  15.  
  16. interface
  17. {$endif}
  18.  
  19. uses
  20.    parseDB
  21. {$ifdef dll}
  22.    ,strings
  23. {$endif}
  24.    ;
  25.  
  26. {$ifdef debug}
  27. var
  28.    debugFile : text;
  29. {$endif}
  30.  
  31. type
  32. {$ifdef dll}
  33.    doubleReal = double;
  34. {$else}
  35.    doubleReal = real;
  36. {$endif}
  37.  
  38. type  
  39.    TokenType   = (Delimiter,Non,variable,Digit,endExpr,Error,Func);
  40.    TokenPtr    = ^TokenRec;
  41.    TokenRec    = Record
  42.                      Next : TokenPtr;
  43.                      Start,Close : Byte;
  44.                   end;
  45.  
  46. var 
  47.     parserErrStr : string; 
  48.     ErrAt        : Byte;
  49.  
  50. {$ifndef dll}
  51. function GetExpr(const s : string; var valid : Boolean) : doubleReal;
  52.  
  53. implementation 
  54. {$endif}
  55.  
  56. end.
  57.